﻿using System.Collections.Generic;
using POS.BusinessEntities;
using POS.DataObjects;

namespace POS.BusinessComponents
{
    public class BCProveedor
    {
        #region Declarations

        private readonly DOProveedor doEntity;
        private const string TempUser = "tempUser"; // TODO: Use the corresponding value
        private const int TempEmpresa = 1;         // TODO: Use the corresponding value
        
        #endregion

        #region Constructors

        public BCProveedor() : this(new DOProveedor()) { }

        public BCProveedor(DOProveedor doEntity)
        {
            this.doEntity = doEntity;
        }

        #endregion
        
        #region Methods: Public

        public virtual IList<BEProveedor> GetList(string filter)
        {
            return doEntity.GetList(TempEmpresa, filter);
        }

        public void Save(BEProveedor entity)
        {
            doEntity.Save(entity, TempEmpresa, TempUser);
        }

        #endregion
    }
}
